# from selenium import webdriver
# import time
#
#
# driver= webdriver.Chrome('C:\\Users\Administrator\AppData\Local\Google\Chrome\Application\chromedriver.exe')
# driver.get("https://www.tianyancha.com")


from selenium import webdriver
import time
driver = webdriver.Chrome('C:\\Users\Administrator\AppData\Local\Google\Chrome\Application\chromedriver.exe')
driver.get("http://www.baidu.com/")
#点击登录链接
time.sleep(5)
driver.find_element_by_xpath("//*[@id='u1']/a[7]").click()
#点击用户登录按钮
time.sleep(5)
driver.find_element_by_class_name("tang-pass-footerBar").find_element_by_css_selector("#TANGRAM__PSP_10__footerULoginBtn").click()
#输入用户名
time.sleep(5)

driver.find_element_by_class_name("pass-text-input pass-text-input-userName").send_keys("du0419")


#输入密码
time.sleep(5)
driver.find_element_by_id("TANGRAM__PSP_10__password").send_keys("du403516887!")
#点击登录按钮
time.sleep(5)
driver.find_element_by_id("TANGRAM__PSP_10__submit").click()
